package com.poetry.common.util;

import lombok.AllArgsConstructor;
import lombok.Data;

public interface IConstant {

    int getCode();

    String getMsg();

    @Data
    @AllArgsConstructor
    class Entry implements IConstant{

        private int code;

        private String msg;
    }

    static IConstant getInstance(int code, String msg) {
        return new Entry(code, msg);
    }
}
